import request from '@/utils/request'

// 查询题库列表
export function listAnswer(query) {
    return request({
        url: '/biz/answer/list',
        method: 'get',
        params: query
    })
}

// 查询题库详细
export function getAnswer(rid) {
    return request({
        url: '/biz/answer/' + rid,
        method: 'get'
    })
}
// 查询题库详细
export function getAnswerdetail(rid) {
    return request({
        url: '/biz/answer/detail/' + rid,
        method: 'get'
    })
}

// 新增题库
export function addAnswer(data) {
    return request({
        url: '/biz/answer',
        method: 'post',
        data: data
    })
}

// 修改题库
export function updateAnswer(data) {
    return request({
        url: '/biz/answer',
        method: 'put',
        data: data
    })
}

// 删除题库
export function delAnswer(rid) {
    return request({
        url: '/biz/answer/' + rid,
        method: 'delete'
    })
}